<?php
include('../../inc/global.inc');
include("../islogin.php");
if(!empty($_GET[id])){
@mysql_query("update advice set state=2 where id='".$_GET[id]."'");
echo "<script>alert('忽略成功!');</script>";
}
?>
<HTML>
<HEAD>
<TITLE>Admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
</HEAD>
<BODY>
<center>
  <table width="90%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">用户留言管理 --- 未处理留言 &nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a></td>
    </tr>
  </table>
  <table width="90%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td width="4%" height="30" align="center" bgcolor="#8DA8CF">编号</td>
	  <td width="8%" align="center" bgcolor="#8DA8CF">类型</td>
      <td width="50%" align="center" bgcolor="#8DA8CF">内容</td>
	  <td width="16%" align="center" bgcolor="#8DA8CF">提交人</td>
      <td width="12%" align="center" bgcolor="#8DA8CF">管理</td>
    </tr>
<?php

   $sql="select advice.*,member.m_user from advice left join member on member.id=advice.m_id where advice.state=0 order by advice.id asc";

   $rs=@mysql_query($sql);
$i=1;
while($row=@mysql_fetch_array($rs)){
$color=($i%2)?"#FFFFFF":"#eeeeee";
?>
    <tr bgcolor=<?=$color?>>
      <td height="25" align="center"><?=$row["id"]?></td>
	  <td height="25" align="center"><?=$row["advice_type"]?></td>
	  <td align="left" style="padding-left:10px;"><?=$row["content"]?></td>
	  <td height="25" align="center"><?=$row["m_name"]?> (<?=$row["m_user"]?>)</td>
      <td align="center">
	  	<a href="index.php?id=<?=$row["id"] ?>">忽略</a> &nbsp;&nbsp;<a href="reply.php?id=<?=$row["id"] ?>">回复</a>
	  </td>
    </tr>
<?php
$i++;}
?>
  </table>
</center>
</BODY>
</HTML>

